package conson.tech.manage.coupons.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import conson.tech.core.response.Response;
import conson.tech.manage.coupons.entity.dto.CouponDto;
import conson.tech.manage.coupons.entity.dto.CouponReturnDto;
import conson.tech.manage.coupons.entity.dto.UserCouponListDto;
import conson.tech.manage.coupons.entity.dto.UserGrantCouponDto;
import conson.tech.manage.coupons.entity.vo.AppSeckillAndReceivceCoupons;
import conson.tech.manage.coupons.entity.vo.UserCouponDetailVo;

import java.text.ParseException;
import java.util.List;

/**
 * InterfaceName: CouponsService
 * Description:  优惠券业务接口
 * Author: ZYF
 * Date: 2020/7/21
 * Version: 1.0
 */
public interface AppCouponsService {

    /**
     * 按活动id获取关联的优惠券列表
     *
     * @param pageIndex
     * @param pageSize
     * @param id
     * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<conson.tech.manage.app.entity.vo.ActivityCouponPageVo>
     */
    Page<UserCouponDetailVo> couponActivityList(Integer pageIndex, Integer pageSize, Long id);

    /**
     * 用户领用优惠券
     *
     * @param currentUserId
     * @param currentUserName
     * @param dto
     * @return conson.tech.core.response.Response
     */
    Response grantCoupon(Long currentUserId, String currentUserName, UserGrantCouponDto dto);

    /**
     * 获取用户我的优惠券
     *
     * @param currentUserId
     * @param pageIndex
     * @param pageSize
     * @param dto
     * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<conson.tech.manage.app.entity.vo.ActivityCouponPageVo>
     */
    Page<UserCouponDetailVo> userCouponList(Long currentUserId, Integer pageIndex, Integer pageSize, UserCouponListDto dto);


    /**
     * 获取用户优惠券配置信息
     *
     * @param currentUserId
     * @param dto
     * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<conson.tech.manage.app.entity.vo.ActivityCouponPageVo>
     */
    List<UserCouponDetailVo> couponConfigDetails(Long currentUserId,CouponDto dto);


    /**
     * 用户领用 限时券活动或领券活动
     *
     * @param currentUserId
     * @param currentUserName
     * @param id
     * @return conson.tech.core.response.Response
     */
    Response grantCouponTime(Long currentUserId, String currentUserName, Long id);

    /**
     * 领券中心用户优惠券列表-领券和秒杀(限时抢)
     *
     * @param currentUserId
     * @return conson.tech.manage.app.entity.vo.AppSeckillAndReceivceCoupons
     */
    AppSeckillAndReceivceCoupons queryCoupons(Long currentUserId) throws ParseException;
}
